package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.DeviceConversationMapper;
import com.ruoyi.ora.domain.DeviceConversation;
import com.ruoyi.ora.service.IDeviceConversationService;

/**
 * 设备通话记录Service业务层处理
 * 
 * @author liuwp
 * @date 2024-11-14
 */
@Service
public class DeviceConversationServiceImpl implements IDeviceConversationService 
{
    @Autowired
    private DeviceConversationMapper deviceConversationMapper;

    /**
     * 查询设备通话记录
     * 
     * @param id 设备通话记录主键
     * @return 设备通话记录
     */
    @Override
    public DeviceConversation selectDeviceConversationById(Long id)
    {
        return deviceConversationMapper.selectDeviceConversationById(id);
    }

    /**
     * 查询设备通话记录列表
     * 
     * @param deviceConversation 设备通话记录
     * @return 设备通话记录
     */
    @Override
    public List<DeviceConversation> selectDeviceConversationList(DeviceConversation deviceConversation)
    {
        return deviceConversationMapper.selectDeviceConversationList(deviceConversation);
    }

    /**
     * 根据业务主键查询一条记录：设备通话记录
     *
     * @param deviceConversation 设备通话记录
     * @return 设备通话记录
     */
    @Override
    public DeviceConversation selectOneDeviceConversation(DeviceConversation deviceConversation)
    {
        return deviceConversationMapper.selectOneDeviceConversation(deviceConversation);
    }

    /**
     * 新增设备通话记录
     * 
     * @param deviceConversation 设备通话记录
     * @return 结果
     */
    @Override
    public int insertDeviceConversation(DeviceConversation deviceConversation)
    {
        deviceConversation.setCreateTime(DateUtils.getNowDate());
        return deviceConversationMapper.insertDeviceConversation(deviceConversation);
    }

    /**
     * 修改设备通话记录
     * 
     * @param deviceConversation 设备通话记录
     * @return 结果
     */
    @Override
    public int updateDeviceConversation(DeviceConversation deviceConversation)
    {
        return deviceConversationMapper.updateDeviceConversation(deviceConversation);
    }

    @Override
    public int updateDeviceConversationCondition(DeviceConversation deviceConversation, DeviceConversation deviceConversationCondition)
    {
        return deviceConversationMapper.updateDeviceConversationCondition(deviceConversation, deviceConversationCondition);
    }

    /**
     * 批量删除设备通话记录
     * 
     * @param ids 需要删除的设备通话记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceConversationByIds(Long[] ids)
    {
        return deviceConversationMapper.deleteDeviceConversationByIds(ids);
    }

    /**
     * 删除设备通话记录信息
     * 
     * @param id 设备通话记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceConversationById(Long id)
    {
        return deviceConversationMapper.deleteDeviceConversationById(id);
    }

    /**
     * 条件删除设备通话记录
     *
     * @param deviceConversation 设备通话记录
     * @return 结果
     */
    @Override
    public int deleteDeviceConversationByCondition(DeviceConversation deviceConversation)
    {
        return deviceConversationMapper.deleteDeviceConversationByCondition(deviceConversation);
    }

}
